<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
</head>
<body>
    <div id="app">
        <p>
            <button v-on:click="number-=1">-1</button>
            <span>{{number}}</span>
            <button v-on:click="number+=1">+1</button>
        </p>
        <p>
            <button v-on:click="say()">古诗</button>
        </p>
    </div>
<!--引入vue文件-->
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<script>
    const vm = Vue.createApp({
        data() {
            return {
                number: 100
            }
        },
        methods: {
            say:function() {
                alert('白毛浮绿水春去，无边落木萧萧下。');
            }
        }
    }).mount('#app');
</script>

</body>
</html>
